package gihub.hanlyjiang.hanlygithub.base;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.hanlyjiang.library.components.frag.BaseFragment;

import butterknife.ButterKnife;
import butterknife.Unbinder;

/**
 * @author hanlyjiang on 2017/6/21-21:33.
 * @version 1.0
 */

public abstract class BKBaseFragment extends BaseFragment {

    private Unbinder unbinder;

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View rootView = super.onCreateView(inflater, container, savedInstanceState);
        unbinder = ButterKnife.bind(this, rootView);
        return rootView;
    }

    @Override
    public void onDestroyView() {
        super.onDestroyView();
        unbinder.unbind();
    }

}
